package net.xdclass.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Component;

import java.util.concurrent.Executor;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * 线程池
 * @author 小二
 */
@Data
@Component
@EnableAsync
@ConfigurationProperties(prefix = "executor")
public class ThreadPoolExecutorConfig {

    private int corePoolSize;
    private int maxPoolSize;
    private int queueCapacity;
    private Long keepAliveSeconds;

}